You can set an advanced filter on a query to set a hard limit or a default value for the number of returned rows.
To limit the number of rows returned by a query
1. Create or edit a query. (See Building Queries.)
2. Select the Filters tab.
3. Select Advanced mode.
4. Select the Limit the number of results returned option.
5. Enter the Value for the maximum number of rows to display
6. (optional) Enter a Prompt for the user and specify the behavior:
□ No: Enforces a hard limit on the specified number of returned rows, which a user cannot change.
□ Required: Makes the specified number of returned rows a default value. The user can change the value up to the maximum defined in the web.config file. If the user specifies zero or a blank value, the query returns the maximum defined in the web.config file.
□ Optional: Makes the specified number of returned rows a default value. The user can change the value up to the maximum defined in the web.config file. If the user does not enter a value, filtering does not occur and the query returns all values.
7. (optional) Enter custom text for the prompt (default is Maximum number of rows to display).
Tip: To create a "top n records" query result, specify at least one property on the Sorting tab.